import Vue from 'vue'
import VueRouter from 'vue-router'
import Manage from "@/views/Manage";
import StuInfo from "@/components/manage/StuInfo";
import Home from "@/components/Home";
import TestView from "@/views/TestView";
import ScreenPage from "@/views/ScreenPage";
import Login from "@/views/Login";
import AdmainInfo from "@/components/manage/AdmainInfo";
import Register from "@/views/Register";
import StuSignIn from "@/views/StuSignIn";
import BasicInfo from "@/components/stuSignIn/BasicInfo";
import InformationComplete from "@/components/stuSignIn/InformationComplete";
import SignIn from "@/components/stuSignIn/SignIn";



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'begin',
    redirect: "login"
  },
  {
    path: '/screenPage',
    name: 'screenPage',
    component: ScreenPage,
  },
  {
    path: '/manage',
    name: 'manage',
    component: Manage,
    children: [{
      path: 'stuInfos',
      name: 'stuInfos',
      component: StuInfo,
    },{
      path: 'home',
      name: 'home',
      component: Home,
    },{
      path:'admainInfo',
      name:'admainInfo',
      component: AdmainInfo
    }]
  },
  {
    path: '/test',
    name: 'test',
    component: TestView,
  },
  {
    path: '/login',
    name:'login',
    component: Login
  },
  {
    path:'/register',
    name:'register',
    component: Register
  },
  {
    path: '/stuSignIn',
    name:'stuSign',
    component: StuSignIn,
    children: [{
      path: 'basicInfo',
      component: BasicInfo
    },{
      path: 'informationComplete',
      component: InformationComplete,
    },{
      path:'signIn',
      component: SignIn
    }]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
